package com.chenju.invokechainservice.service.impl;

import com.chenju.invokechainservice.dao.TInterfaceNodeRepository;
import com.chenju.invokechainservice.domain.TInterfaceNode;
import com.chenju.invokechainservice.service.TInterfaceNodeService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TInterfaceNodeServiceImplement implements TInterfaceNodeService {
    private final TInterfaceNodeRepository repository;

    public TInterfaceNodeServiceImplement(TInterfaceNodeRepository repository) {
        this.repository = repository;
    }

    @Override
    public TInterfaceNode save(TInterfaceNode node) {
        return repository.save(node);
    }

    @Override
    public TInterfaceNode findByApplicationNameAndName(String applicationName, String name) {
        return repository.findByApplicationNameAndName(applicationName, name);
    }

    @Override
    public List<String> findAllImpactInterfaceNodeByMethodName(String name) {
        return repository.findAllImpactInterfaceNodeByMethodName(name);
    }
}
